#include <iostream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;

int t;
int n;
string s;

bool vis[110][26];

bool check(int left, int right)
{
    for (int i = 0; i < 26; i++)
    {
        if (vis[left][i] && vis[right][i]) return true;
    }
    return false;
}

int main()
{
    cin >> t;
    while (t--)
    {
        memset(vis, 0, sizeof vis);
        cin >> n;
        for (int i = 0; i < n; i++)
        {
            cin >> s;
            for (auto ch : s)
            {
                vis[i][ch - 'a'] = true;
            }
        }

        int left = 0, right = n - 1;
        while (left < right)
        {
            if (!check(left, right)) break;
            left++;
            right--;
        }
        if (left < right) cout << "No" << endl;
        else cout << "Yes" << endl;
    }
}